import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
        Queue<Integer> q = new LinkedList<>();
        q.offer(11);
        q.offer(112);
        q.offer(113);
        q.offer(114);
        System.out.println(q.peek());//获取
        System.out.println(q.poll());//删除
        System.out.println(q.size());
        System.out.println(q.isEmpty());
    }
    public static void main1(String[] args) {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(11);
        myQueue.offer(22);
        myQueue.offer(33);
        myQueue.offer(44);

        System.out.println(myQueue.poll());//出列
        System.out.println(myQueue.peek());//获取不删除
        System.out.println(myQueue.size());
        System.out.println(myQueue.isEmpty());
    }
}
